<!DOCTYPE html>
<html>
{include file="public/head" /}
<body>
          <div class="nav-tabs-custom" style="box-shadow:0 0 0 0; margin:5px;">
            <ul class="nav nav-tabs">
            <li class="active"><a href="#tab_1" data-toggle="tab">基础设置</a></li>
            <li><a href="#tab_2" data-toggle="tab">扩展设置</a></li>               
            </ul> 
        <form id="myform" class="myform form-horizontal"  method="post">
        <input type="hidden" id="role_id" name="role_id" value="{$info['role_id']|default=''}"> 
       <div class="box-body">
           <div class="tab-content tab-fade fade active in " id="tab_1"> 
           <div class="row">
           {notempty name="info.role_id"}
                <div class="col-md-3 col-sm-6 col-xs-12 mb10 pr00">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频名称：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
               <input type="text" class="form-control" id="vod_name" name="vod_name" value="{$info.vod.vod_name|default=''}" readonly> 
              </div>   
              </div>          
                 <div class="col-md-3 col-sm-6 col-xs-12 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频ID：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
               <input type="text" class="form-control" id="role_vid" name="role_vid" value="{$info.role_vid|default=''}" readonly> 
              </div>   
              </div> 
               <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色分类：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
 <select id="role_cid" name="role_cid" class="form-control select2" required="required" placeholder="请选择分类" style="width:100%">
{volist name=":F('_data/listrole')" id="vo"}
 {notempty name="vo.son"}
<optgroup label="{$vo.list_name}">
{volist name="vo['son']" id="splist"}
<option value="{$splist.list_id}" {eq name="splist.list_id" value="$info['role_cid']"}selected{/eq}>├ {$splist.list_name}</option>
{/volist}
  </optgroup>
{else/}
  <option value="{$vo.list_id}" {eq name="vo.list_id" value="$info['role_cid']"}selected{/eq}>{$vo.list_name}</option>
{/notempty}
{/volist}
</select>
              </div>   
              </div> 
                  <div class="col-md-3 col-sm-6 col-xs-12 mb10">
               <span class="text-link form-control">
               <span class="pretty success input-xz">
<input name="sendurl" type="checkbox" value="1" id="checkbox" {empty name="info['role_id']"}checked{/empty}> 
<label><i class="mdi mdi-check"></i> 推送百度</label>
</span></span>  
              </div>  

                                        
                 <div class="col-md-3 col-sm-6 col-xs-12 mb10 pr00">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色名称：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
             <input type="text" class="form-control" id="role_name" name="role_name" value="{$info.role_name|default=''}" >
              </div>   
              </div>
                 <div class="col-md-3 col-sm-6 col-xs-12 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">演员名字：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
             <input type="text" class="form-control" id="role_star" name="role_star" value="{$info.role_star|default=''}" > 
              </div>   
              </div>
                             <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色排序：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
             <input type="text" class="form-control text-center" id="role_oid" name="role_oid" value="{$info.role_oid|default=''}" > 
              </div>   
              </div>
                 <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色状态：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
<select name="role_status" class="form-control select2" style="width:100%">
    <option value="1">已审</option>
     <option value="0" {eq name="info.role_status" value="0" }selected{/eq}>未审</option>
</select> 
              </div>   
              </div>  



      
               <div class="col-md-6 col-sm-12 col-xs-12 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色属性：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="hidden" name="role_prty" value="">
             <span class="text-link form-control">
                      {volist name=":parse('textarea',config('setting.document_position'))" id="vo"}
                      <label class="pretty success">
	  <input type="checkbox" name="role_prty[]" value="{$key}" id="checkbox" {if check_attribute($info['role_prty'],$key)}checked="checked"{/if}> 
	  <label><i class="mdi mdi-check"></i> {$vo|msubstr=0,2}</label>
	</label>
                      {/volist} 
            </span> 
               </div> 
               </div> 
               
  
       
              <div class="col-md-6 col-sm-12 col-xs-12 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色图片：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
               <input class="form-control" size="50" id="role_pic" name="role_pic" type="text" value="{$info['role_pic']|default=''}">
<span class="input-group-btn">
                      <button type="button" class="btn btn-primary btn-flat plupload" id="plupload-image" data-input-id="role_pic" data-mimetype="image/*"   data-multiple="false"><i class="fa fa-upload"></i> 上传</button>
                    </span>
                     
              </div>   
              </div>
              
      {else/}
                <div class="col-md-3 col-sm-3 col-xs-12 mb10 pr00">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">视频ID：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
               <input type="text" class="form-control" id="role_vid" name="role_vid" value="{$info.vod_id|default=''}"> 
              </div>   
              </div>    
               <div class="col-md-3 col-sm-3 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色分类：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
 <select id="role_cid" name="role_cid" class="form-control select2" required="required" placeholder="请选择分类" style="width:100%">
{volist name=":F('_data/listrole')" id="vo"}
 {notempty name="vo.son"}
<optgroup label="{$vo.list_name}">
{volist name="vo['son']" id="splist"}
<option value="{$splist.list_id}" {eq name="splist.list_id" value="$info['role_cid']"}selected{/eq}>├ {$splist.list_name}</option>
{/volist}
  </optgroup>
{else/}
  <option value="{$vo.list_id}" {eq name="vo.list_id" value="$info['role_cid']"}selected{/eq}>{$vo.list_name}</option>
{/notempty}
{/volist}
</select>
              </div>   
              </div>  
              

                                <div class="col-md-6 col-sm-3 col-xs-6 mb10">
               <span class="text-link form-control" style="border:none">
               <span class="pretty success input-xz">
<input name="sendurl" type="checkbox" value="1" id="checkbox" {empty name="info['tv_id']"}checked{/empty}> 
<label><i class="mdi mdi-check"></i> 推送百度</label>
</span></span>  
              </div>  
                          
    <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色名称：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
             <input type="text" class="form-control" id="role_name" name="role_name" value="{$info.role_name|default=''}" >
              </div>   
              </div>
                 <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">演员名字：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
             <input type="text" class="form-control" id="role_star" name="role_star" value="{$info.role_star|default=''}" > 
              </div>   
              </div>
              <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色排序：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
             <input type="text" class="form-control text-center" id="role_oid" name="role_oid" value="{$info.role_oid|default=''}" > 
              </div>   
              </div>
                <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色状态：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
<select name="role_status" class="form-control select2" style="width:100%">
    <option value="1">已审</option>
     <option value="0" {eq name="info.role_status" value="0" }selected{/eq}>未审</option>
</select> 
              </div>   
              </div>             
                <div class="col-md-6 col-sm-12 col-xs-12 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色属性：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="hidden" name="role_prty" value="">
             <span class="text-link form-control">
                      {volist name=":parse('textarea',config('setting.document_position'))" id="vo"}
                      <label class="pretty success">
	  <input type="checkbox" name="role_prty[]" value="{$key}" id="checkbox" {if check_attribute($info['role_prty'],$key)}checked="checked"{/if}> 
	  <label><i class="mdi mdi-check"></i> {$vo|msubstr=0,2}</label>
	</label>
                      {/volist} 
            </span> 
               </div> 
               </div> 
               
                 <div class="col-md-6 col-sm-12 col-xs-12 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色图片：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
               <input class="form-control" size="50" id="role_pic" name="role_pic" type="text" value="{$info['role_pic']|default=''}">
<span class="input-group-btn">
                      <button type="button" class="btn btn-primary btn-flat plupload" id="plupload-image" data-input-id="role_pic" data-mimetype="image/*"   data-multiple="false"><i class="fa fa-upload"></i> 上传</button>
                    </span>
                     
              </div>   
              </div>                                 
                                                                   
  {/notempty}      
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色介绍：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <textarea  class="editor"  id="role_content" name="role_content"  style=" width:100%; height:200px">{$info['role_content']}</textarea>
              </div> 
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">更新时间：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
              <input type="text" name="role_addtime" value="{notempty name="info.role_addtime"}{$info.role_addtime|date='Y-m-d H:i:s',###}{else/}{:date('Y-m-d H:i:s',time())}{/notempty}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss">
              
<span class="input-group-btn">
<span class="pretty success input-xz">
<input name="role_checktime" type="checkbox" value="1" id="checkbox" {notempty name=":config('system.system_uptime')"}checked{/notempty}> 
<label><i class="mdi mdi-check"></i> 更新时间</label>
</span>
</span>     
              </div>              
               </div>
              <!-- /row --> 
            </div>
            <!-- /.tab_1-->
           <div class="tab-content tab-fade fade " id="tab_2">
            <div class="row">         
             <div class="col-md-3 col-sm-6 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">推荐星级：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input name="role_stars" id="role_stars" type="hidden" value="{$info.role_stars|default=''}">
                <span class="text-link form-control" style="padding-top:4px;">
                {volist name=":admin_star_arr($info.role_stars)" id="ajaxstar"}<img src="{$Think.TPL_PATH}tpl/zanpianadmin/img/star{$ajaxstar}.gif" id="role_{$i}" class="addstars" width="19px" height="19px">{/volist}
                </span>
              </div>   
              </div>              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">独立模版：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="role_skin"  value="{$info.role_skin|default=''}" class="form-control text-center" placeholder="留空使用分类中内容模版">
              </div>   
              </div> 
                           <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">用户ID：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="role_uid" id="role_uid"  value="{$info.role_uid|default=''}" class="form-control text-center" >
              </div>   
              </div>
             <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">总人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="role_hits" name="role_hits"  value="{$info.role_hits|default=''}" class="form-control text-center" >
              </div>   
              </div>
              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">月人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="role_hits_month"  value="{$info.role_hits_month|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">周人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="role_hits_week"  value="{$info.role_hits_week|default=''}" class="form-control text-center" >
              </div>   
              </div>                                          
                                                                                    
              <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">日人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="role_hits_day"  value="{$info.role_hits_day|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              
               <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">顶人数：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="role_up" name="role_up"  value="{$info.role_up|default='0'}" class="form-control text-center" >
              </div>   
              </div>
                           
                <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">踩人数：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="role_down" name="role_down"  value="{$info.role_down|default='0'}" class="form-control text-center" >
              </div>   
              </div>
              </div>
              <!-- /row -->
                             
              
                                             
            </div> 
            <!-- /.tab_2 -->
         
        <div class="box-footer {notempty name=":request()->param('dialog')"}hidden{/notempty} layer-footer">
          <div  class="footer-btn">
               <button type="submit" class="btn btn-success btn-embossed">确定</button>
               <button type="reset" class="btn btn-default btn-embossed">重置</button>
               {notempty name=":request()->param('dialog')"}
               <button type="reset" class="btn btn-primary btn-embossed btn-close" onClick="layer.closeAll();"> 关闭</button>
               {/notempty}
            </div>
       </div>
       <!-- /.box-footer -->     
</div>
<!-- /.box-body --> 
</form>
</div>
<!-- /.nav-tabs-custom -->    
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	zanpian.cms.vod();
    $(document).on('click', ".addurl", function() {
			var $old = $("#urldata>.urldata:last").html();
			$urln = $("#urldata>.urldata").length;
			$old = $old.replace("周期" + $urln, "周期" + ($urln + 1));
			$("#urldata>.urldata:last-child").after('<div class="urldata input-group mb10" id="data_' + ($urln + 1) + '">' + $old + '</div>');
			$("#urldata>.urldata:last #role_date").val($("#role_date:last option").val());
			$("#urldata>.urldata:last textarea").val('');
					
	})		

});	
</script>
</body>
</html>
